home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hyper Stacks 1994 May
/
Hyper Stacks (Pacific HiTech)(1994)[Mac].iso
/
HyperTalk
/
RegionPackage
/
BitMapToRegion ƒ
/
HyperXCmd.h
< prev
Wrap
Text File
|
1990-12-10
|
28KB
|
864 lines
/*
HyperXCmd.h Definitions for calling all standard
HyperCard callback routines from C.
©Apple Computer, Inc. 1987-1990
All Rights Reserved.
Hacked about for LightSpeed/Think C by Nigel Perry, 1988-1990
Typedef's changed a little.
Callbacks defined as inline macros not external Pascal procedures.
*/
#ifndef _HyperXCmd_LSC_
#define _HyperXCmd_LSC_
/* Unlike the old days, we have to make sure we have some definitions first… */
#include <MacTypes.h>
#include <EventMgr.h>
#include <MenuMgr.h>
#include <TextEdit.h>
#include <PackageMgr.h>
/*result codes */
#define xresSucc 0
#define xresFail 1
#define xresNotImp 2
/* request codes */
#define xreqSendCardMessage 1
#define xreqEvalExpr 2
#define xreqStringLength 3
#define xreqStringMatch 4
#define xreqSendHCMessage 5
#define xreqZeroBytes 6
#define xreqPasToZero 7
#define xreqZeroToPas 8
#define xreqStrToLong 9
#define xreqStrToNum 10
#define xreqStrToBool 11
#define xreqStrToExt 12
#define xreqLongToStr 13
#define xreqNumToStr 14
#define xreqNumToHex 15
#define xreqBoolToStr 16
#define xreqExtToStr 17
#define xreqGetGlobal 18
#define xreqSetGlobal 19
#define xreqGetFieldByName 20
#define xreqGetFieldByNum 21
#define xreqGetFieldByID 22
#define xreqSetFieldByName 23
#define xreqSetFieldByNum 24
#define xreqSetFieldByID 25
#define xreqStringEqual 26
#define xreqReturnToPas 27
#define xreqScanToReturn 28
#define xreqScanToZero 39 /* was supposed to be 29! Oops! */
/* new HyperCard 2.0 callbacks */
#define xreqFormatScript 31
#define xreqZeroTermHandle 32
#define xreqPrintTE 33
#define xreqSendHCEvent 34
#define xreqHCWordBreakProc 35
#define xreqBeginXSound 36
#define xreqEndXSound 37
#define xreqRunHandler 38
#define xreqGetXResInfo 40
#define xreqGetFilePath 41
#define xreqFrontDocWindow 42
#define xreqPointToStr 43
#define xreqRectToStr 44
#define xreqStrToPoint 45
#define xreqStrToRect 46
#define xreqGetFieldTE 47
#define xreqSetFieldTE 48
#define xreqGetObjectName 49
#define xreqGetObjectScript 50
#define xreqSetObjectScript 51
#define xreqStackNameToNum 52
#define xreqNotify 53
#define xreqShowHCAlert 54
#define xreqNewXWindow 100
#define xreqGetNewXWindow 100 /* params set differently */
#define xreqCloseXWindow 101
#define xreqSetXWIdleTime 102
#define xreqXWHasInterruptCode 103
#define xreqRegisterXWMenu 104
#define xreqBeginXWEdit 105 /* param[1] = 1 */
#define xreqEndXWEdit 105 /* param[1] = 0 */
#define xreqSaveXWScript 106
#define xreqGetCheckPoints 107
#define xreqSetCheckPoints 108
#define xreqXWAllowReEntrancy 109
#define xreqSendWindowMessage 110
#define xreqHideHCPalettes 111
#define xreqShowHCPalettes 112
#define xreqXWAlwaysMoveHigh 113
#define xreqGoScript 200
#define xreqStepScript 201
#define xreqAbortScript 202
#define xreqCountHandlers 203
#define xreqGetHandlerInfo 204
#define xreqGetVarInfo 205
#define xreqSetVarInfo 206
#define xreqGetStackCrawl 207
#define xreqTraceScript 208
/* XCMDBlock constants for event.what... */
#define xOpenEvt 1000 /* the first event after you are created */
#define xCloseEvt 1001 /* your window is being forced close (Quit?) */
#define xGiveUpEditEvt 1002 /* you are losing Edit... */
#define xGiveUpSoundEvt 1003 /* you are losing the sound channel... */
#define xHidePalettesEvt 1004 /* someone called HideHCPalettes */
#define xShowPalettesEvt 1005 /* someone called ShowHCPalettes */
#define xEditUndo 1100 /* Edit——Undo */
#define xEditCut 1102 /* Edit——Cut */
#define xEditCopy 1103 /* Edit——Copy */
#define xEditPaste 1104 /* Edit——Paste */
#define xEditClear 1105 /* Edit——Clear */
#define xSendEvt 1200 /* script has sent you a message (text) */
#define xSetPropEvt 1201 /* set a window property */
#define xGetPropEvt 1202 /* get a window property */
#define xCursorWithin 1300 /* cursor is within the window */
#define xMenuEvt 1400 /* user has selected an item in your menu */
#define xMBarClickedEvt 1401 /* a menu is about to be shown--update if needed */
#define xShowWatchInfoEvt 1501 /* for variable and message watchers */
#define xScriptErrorEvt 1502 /* place the insertion point */
#define xDebugErrorEvt 1503 /* user clicked "Debug" at a complaint */
#define xDebugStepEvt 1504 /* hilite the line */
#define xDebugTraceEvt 1505 /* same as step but tracing */
#define xDebugFinishedEvt 1506 /* script ended */
#define paletteProc 2048 /* Windoid with grow box */
#define palNoGrowProc 2052 /* standard Windoid defproc */
#define palZoomProc 2056 /* Windoid with zoom and grow */
#define palZoomNoGrow 2060 /* Windoid with zoom and no grow */
#define hasZoom 8
#define hasTallTBar 2
#define toggleHilite 1
#define maxCachedChecks 16 /* maximum number of checkpoints in a script */
/* paramCount is set to these constants when first calling special XThings */
#define xMessageWatcherID -2
#define xVariableWatcherID -3
#define xScriptEditorID -4
#define xDebuggerID -5
/* XTalkObjectPtr->objectKind values */
#define stackObj 1
#define bkgndObj 2
#define cardObj 3
#define fieldObj 4
#define buttonObj 5
/* Alert IDs */
#define errorDlgID 1 /* 1:OK */
#define confirmDlgID 2 /* 1:OK, 2:Cancel */
#define confirmDelDlgID 3 /* 1:Cancel, 2:Delete */
#define yesNoCancelDlgID 4 /* 1:Yes, 2:Cancel, 3:No */
typedef struct XCmdBlock
{ short paramCount; /* If = -1 then new use for XWindoids */
Handle params[16];
Handle returnValue;
Boolean passFlag;
char * entryPoint; /* to call back to HyperCard */
short request;
short result;
long inArgs[8];
long outArgs[4];
} XCmdBlock, *XCmdBlockPtr, *XCmdPtr;
typedef struct XWEventInfo
{ EventRecord event;
WindowPtr eventWindow;
long eventParams[9];
Handle eventResult;
} XWEventInfo, *XWEventInfoPtr;
typedef struct XTalkObject
{ short objectKind; /* stack, bkgnd, card, field, or button */
long stackNum; /* reference number of the source stack */
long bkgndID;
long cardID;
long buttonID;
long fieldID;
} XTalkObject, *XTalkObjectPtr;
typedef struct CheckPts
{ short checks[maxCachedChecks];
} CheckPts, *CheckPtPtr, **CheckPtHandle;
typedef Byte Str31[32];
typedef Str31 *Str31Ptr;
typedef void (*MyProcPtr) ();
/* Send a HyperCard message (a command with arguments) to the current card.
msg is a pointer to a pascal format string. */
#define SendCardMessage(paramPtr,msg) \
( paramPtr->inArgs[0] = (long)msg, \
paramPtr->request = xreqSendCardMessage, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Evaluate a HyperCard expression and return the answer. The answer is
a handle to a zero-terminated string. */
#define EvalExpr(paramPtr,expr) \
( \
paramPtr->inArgs[0] = (long)expr, \
paramPtr->request = xreqEvalExpr, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Count the characters from where strPtr points until the next zero byte.
Does not count the zero itself. strPtr must be a zero-terminated string. */
#define StringLength(paramPtr,strPtr) \
( \
paramPtr->inArgs[0] = (long)strPtr, \
paramPtr->request = xreqStringLength, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(long)paramPtr->outArgs[0] \
)
/* Perform case-insensitive match looking for pattern anywhere in
target, returning a pointer to first character of the first match,
in target or NIL if no match found. pattern is a pascal string,
and target is a zero-terminated string. */
#define StringMatch(paramPtr,pattern,target) \
( \
paramPtr->inArgs[0] = (long)pattern, \
paramPtr->inArgs[1] = (long)target, \
paramPtr->request = xreqStringMatch, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Ptr)paramPtr->outArgs[0] \
)
/* Send a HyperCard message (a command with arguments) to HyperCard.
msg is a pointer to a pascal format string. */
#define SendHCMessage(paramPtr,msg) \
( paramPtr->inArgs[0] = (long)msg, \
paramPtr->request = xreqSendHCMessage, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Write zeros into memory starting at destPtr and going for longCount
number of bytes. */
#define ZeroBytes(paramPtr,dstPtr,longCount) \
( \
paramPtr->inArgs[0] = (long)dstPtr, \
paramPtr->inArgs[1] = longCount, \
paramPtr->request = xreqZeroBytes, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert a pascal string to a zero-terminated string. Returns a handle
to a new zero-terminated string. The caller must dispose the handle.
You'll need to do this for any result or argument you send from
your XCMD to HyperTalk. */
#define PasToZero(paramPtr,pasStr) \
( \
paramPtr->inArgs[0] = (long)pasStr, \
paramPtr->request = xreqPasToZero, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Fill the pascal string with the contents of the zero-terminated
string. You create the pascal string and pass it in as a VAR
parameter. Useful for converting the arguments of any XCMD to
pascal strings. */
#define ZeroToPas(paramPtr,zeroStr,pasStr) \
( \
paramPtr->inArgs[0] = (long)zeroStr, \
paramPtr->inArgs[1] = (long)pasStr, \
paramPtr->request = xreqZeroToPas, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert a string of ASCII decimal digits to an unsigned long integer. */
#define StrToLong(paramPtr,strPtr) \
( \
paramPtr->inArgs[0] = (long)strPtr, \
paramPtr->request = xreqStrToLong, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(long)paramPtr->outArgs[0] \
)
/* Convert a string of ASCII decimal digits to a signed long integer.
Negative sign is allowed. */
#define StrToNum(paramPtr,str) \
( \
paramPtr->inArgs[0] = (long)str, \
paramPtr->request = xreqStrToNum, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
paramPtr->outArgs[0] \
)
/* Convert the pascal strings 'true' and 'false' to booleans. */
#define StrToBool(paramPtr,str) \
( \
paramPtr->inArgs[0] = (long)str, \
paramPtr->request = xreqStrToBool, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Boolean)paramPtr->outArgs[0] \
)
/* Convert a string of ASCII decimal digits to an extended long integer.
Instead of returning a new extended, as pascal does, it expects you
to create myext and pass it in to be filled. */
#define StrToExt(paramPtr,str,myext) \
( \
paramPtr->inArgs[0] = (long)str, \
paramPtr->inArgs[1] = (long)myext, \
paramPtr->request = xreqStrToExt, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert an unsigned long integer to a pascal string. Instead of
returning a new string, as pascal does, it expects you to
create mystr and pass it in to be filled. */
#define LongToStr(paramPtr,posNum,mystr) \
( \
paramPtr->inArgs[0] = (long)posNum, \
paramPtr->inArgs[1] = (long)mystr, \
paramPtr->request = xreqLongToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert a signed long integer to a pascal string. Instead of
returning a new string, as pascal does, it expects you to
create mystr and pass it in to be filled. */
#define NumToStr(paramPtr,num,mystr) \
( \
paramPtr->inArgs[0] = num, \
paramPtr->inArgs[1] = (long)mystr, \
paramPtr->request = xreqNumToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert an unsigned long integer to a hexadecimal number and put it
into a pascal string. Instead of returning a new string, as
pascal does, it expects you to create mystr and pass it in to be filled. */
#define NumToHex(paramPtr,num,nDigits,mystr) \
( \
paramPtr->inArgs[0] = num, \
paramPtr->inArgs[1] = nDigits, \
paramPtr->inArgs[2] = (long)mystr, \
paramPtr->request = xreqNumToHex, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert a boolean to 'true' or 'false'. Instead of returning
a new string, as pascal does, it expects you to create mystr
and pass it in to be filled. */
#define BoolToStr(paramPtr,bool,mystr) \
( \
paramPtr->inArgs[0] = (long)bool, \
paramPtr->inArgs[1] = (long)mystr, \
paramPtr->request = xreqBoolToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Convert an extended long integer to decimal digits in a string.
Instead of returning a new string, as pascal does, it expects
you to create mystr and pass it in to be filled. */
#define ExtToStr(paramPtr,myext,mystr) \
( \
paramPtr->inArgs[0] = (long)myext, \
paramPtr->inArgs[1] = (long)mystr, \
paramPtr->request = xreqExtToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Return a handle to a zero-terminated string containing the value of
the specified HyperTalk global variable. */
#define GetGlobal(paramPtr,globName) \
( \
paramPtr->inArgs[0] = (long)globName, \
paramPtr->request = xreqGetGlobal, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Set the value of the specified HyperTalk global variable to be
the zero-terminated string in globValue. The contents of the
Handle are copied, so you must still dispose it afterwards. */
#define SetGlobal(paramPtr,globName,globValue) \
( \
paramPtr->inArgs[0] = (long)globName, \
paramPtr->inArgs[1] = (long)globValue, \
paramPtr->request = xreqSetGlobal, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Return a handle to a zero-terminated string containing the value of
field fieldName on the current card. You must dispose the handle. */
#define GetFieldByName(paramPtr,cardFieldFlag,fieldName) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = (long)fieldName, \
paramPtr->request = xreqGetFieldByName, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Return a handle to a zero-terminated string containing the value of
field fieldNum on the current card. You must dispose the handle. */
#define GetFieldByNum(paramPtr,cardFieldFlag,fieldNum) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = fieldNum, \
paramPtr->request = xreqGetFieldByNum, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Return a handle to a zero-terminated string containing the value of
the field whise ID is fieldID. You must dispose the handle. */
#define GetFieldByID(paramPtr,cardFieldFlag,fieldID) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = fieldID, \
paramPtr->request = xreqGetFieldByID, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
/* Set the value of field fieldName to be the zero-terminated string
in fieldVal. The contents of the Handle are copied, so you must
still dispose it afterwards. */
#define SetFieldByName(paramPtr,cardFieldFlag,fieldName,fieldVal) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = (long)fieldName, \
paramPtr->inArgs[2] = (long)fieldVal, \
paramPtr->request = xreqSetFieldByName, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Set the value of field fieldNum to be the zero-terminated string
in fieldVal. The contents of the Handle are copied, so you must
still dispose it afterwards. */
#define SetFieldByNum(paramPtr,cardFieldFlag,fieldNum,fieldVal) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = fieldNum, \
paramPtr->inArgs[2] = (long)fieldVal, \
paramPtr->request = xreqSetFieldByNum, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Set the value of the field whose ID is fieldID to be the zero-
terminated string in fieldVal. The contents of the Handle are
copied, so you must still dispose it afterwards. */
#define SetFieldByID(paramPtr,cardFieldFlag,fieldID,fieldVal) \
( \
paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = fieldID, \
paramPtr->inArgs[2] = (long)fieldVal, \
paramPtr->request = xreqSetFieldByID, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Return true if the two strings have the same characters.
Case insensitive compare of the strings. */
#define StringEqual(paramPtr,str1,str2) \
( \
paramPtr->inArgs[0] = (long)str1, \
paramPtr->inArgs[1] = (long)str2, \
paramPtr->request = xreqStringEqual, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Boolean)paramPtr->outArgs[0] \
)
/* zeroStr points into a zero-terminated string. Collect the
characters from there to the next carriage Return and return
them in the pascal string pasStr. If a Return is not found,
collect chars until the end of the string. */
#define ReturnToPas(paramPtr,zeroStr,pasStr) \
( \
paramPtr->inArgs[0] = (long)zeroStr, \
paramPtr->inArgs[1] = (long)pasStr, \
paramPtr->request = xreqReturnToPas, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Move the pointer scanPtr along a zero-terminated
string until it points at a Return character
or a zero byte. */
#define ScanToReturn(paramPtr,scanHndl) \
( \
paramPtr->inArgs[0] = (long)scanHndl, \
paramPtr->request = xreqScanToReturn, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* Move the pointer scanPtr along a zero-terminated
string until it points at a zero byte. */
#define ScanToZero(paramPtr,scanHndl) \
( \
paramPtr->inArgs[0] = (long)scanHndl, \
paramPtr->request = xreqScanToZero, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
/* New HyperCard 2.0 callbacks */
#define RunHandler(paramPtr, handler) \
( paramPtr->inArgs[0] = (long)handler, \
paramPtr->request = xreqRunHandler, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define ZeroTermHandle(paramPtr, hndl) \
( paramPtr->inArgs[0] = (long)hndl, \
paramPtr->request = xreqZeroTermHandle, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define PointToStr(paramPtr, pt, str) \
( paramPtr->inArgs[0] = (long)pt, \
paramPtr->inArgs[1] = (long)str, \
paramPtr->request = xreqPointToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define RectToStr(paramPtr, rct, str) \
( paramPtr->inArgs[0] = (long)rct, \
paramPtr->inArgs[1] = (long)str, \
paramPtr->request = xreqRectToStr, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define StrToPoint(paramPtr, str, pt) \
( paramPtr->inArgs[0] = (long)str, \
paramPtr->inArgs[1] = (long)pt, \
paramPtr->request = xreqStrToPoint, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define StrToRect(paramPtr, str, rct) \
( paramPtr->inArgs[0] = (long)str, \
paramPtr->inArgs[1] = (long)rct, \
paramPtr->request = xreqStrToRect, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetFieldTE(paramPtr, cardFieldFlag, fieldID,fieldNum, fieldNamePtr) \
( paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = (long)fieldID, \
paramPtr->inArgs[2] = (long)fieldNum, \
paramPtr->inArgs[3] = (long)fieldTE, \
paramPtr->request = xreqGetFieldTE, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(TEHandle)paramPtr->outArgs[0] \
)
#define SetFieldTE(paramPtr, cardFieldFlag, fieldID,fieldNum, fieldNamePtr, fieldTE) \
( paramPtr->inArgs[0] = (long)cardFieldFlag, \
paramPtr->inArgs[1] = (long)fieldID, \
paramPtr->inArgs[2] = (long)fieldNum, \
paramPtr->inArgs[3] = (long)fieldNamePtr, \
paramPtr->inArgs[4] = (long)fieldTE, \
paramPtr->request = xreqSetFieldTE, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define BeginXSound(paramPtr, window) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->request = xreqBeginXSound, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define EndXSound(paramPtr) \
( paramPtr->request = xreqEndXSound, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetFilePath(paramPtr, fileName, numTypes, typeList, askUser, fileType, fullName) \
( paramPtr->inArgs[0] = (long)fileName, \
paramPtr->inArgs[1] = (long)numTypes, \
paramPtr->inArgs[2] = (long)typeList, \
paramPtr->inArgs[3] = (long)askUser, \
paramPtr->inArgs[4] = (long)fileType, \
paramPtr->inArgs[5] = (long)fullName, \
paramPtr->request = xreqGetFilePath, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(paramPtr->result == 0 ? false : (paramPtr->result = 0, true)) \
)
#define GetXResInfo(paramPtr, resFile, resID, rType, name) \
( paramPtr->inArgs[0] = (long)resFile, \
paramPtr->inArgs[1] = (long)resID, \
paramPtr->inArgs[2] = (long)rType, \
paramPtr->inArgs[3] = (long)name, \
paramPtr->request = xreqGetXResInfo, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define Notify(paramPtr) \
( paramPtr->request = xreqNotify, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SendHCEvent(paramPtr, event) \
( paramPtr->inArgs[0] = (long)event, \
paramPtr->request = xreqSendHCEvent, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SendWindowMessage(paramPtr, windPtr, windowName, msg) \
( paramPtr->inArgs[0] = (long)windPtr, \
paramPtr->inArgs[1] = (long)windowName, \
paramPtr->inArgs[2] = (long)msg, \
paramPtr->request = xreqSendWindowMessage, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define FrontDocWindow(paramPtr) \
( paramPtr->request = xreqFrontDocWindow, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(WindowPtr)paramPtr->outArgs[0] \
)
#define StackNameToNum(paramPtr, stackName) \
( paramPtr->inArgs[0] = (long)stackName, \
paramPtr->request = xreqStackNameToNum, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(long)paramPtr->outArgs[0] \
)
#define ShowHCAlert(paramPtr, dlgID, promptStr) \
( paramPtr->inArgs[0] = (long)dlgID, \
paramPtr->inArgs[1] = (long)promptStr, \
paramPtr->request = xreqShowHCAlert, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(int)paramPtr->outArgs[0] \
)
#define NewXWindow(paramPtr, boundsRect, title, visible, procID, color, floating) \
( paramPtr->inArgs[0] = (long)color, \
paramPtr->inArgs[1] = (long)visible, \
paramPtr->inArgs[2] = 0, \
paramPtr->inArgs[3] = 0, \
paramPtr->inArgs[4] = (long)procID, \
paramPtr->inArgs[5] = (long)boundsRect, \
paramPtr->inArgs[6] = (long)title, \
paramPtr->inArgs[7] = (long)floating, \
paramPtr->request = xreqNewXWindow, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(WindowPtr)paramPtr->outArgs[0] \
)
#define GetNewXWindow(paramPtr, templateType, templateID, color, floating) \
( paramPtr->inArgs[0] = (long)color, \
paramPtr->inArgs[2] = (long)templateType, \
paramPtr->inArgs[3] = (long)templateID, \
paramPtr->inArgs[7] = (long)floating, \
paramPtr->request = xreqNewXWindow, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(WindowPtr)paramPtr->outArgs[0] \
)
#define CloseXWindow(paramPtr, window) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->request = xreqCloseXWindow, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define HideHCPalettes(paramPtr) \
( paramPtr->request = xreqHideHCPalettes, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define ShowHCPalettes(paramPtr) \
( paramPtr->request = xreqShowHCPalettes, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define RegisterXWMenu(paramPtr, window, menu, registering) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = (long)menu, \
paramPtr->inArgs[2] = (long)registering, \
paramPtr->request = xreqRegisterXWMenu, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SetXWIdleTime(paramPtr, window, interval) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = (long)interval, \
paramPtr->request = xreqSetXWIdleTime, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define XWHasInterruptCode(paramPtr, window, haveCode) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = (long)haveCode, \
paramPtr->request = xreqXWHasInterruptCode, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define XWAlwaysMoveHigh(paramPtr, window, moveHigh) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = (long)moveHigh, \
paramPtr->request = xreqXWAlwaysMoveHigh, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define XWAllowReEntrancy(paramPtr, window, allowSysEvts, allowHCEvts) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = (long)allowSysEvts, \
paramPtr->inArgs[2] = (long)allowHCEvts, \
paramPtr->request = xreqXWAllowReEntrancy, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define BeginXWEdit(paramPtr, window) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = 1, \
paramPtr->request = xreqBeginXWEdit, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define EndXWEdit(paramPtr, window) \
( paramPtr->inArgs[0] = (long)window, \
paramPtr->inArgs[1] = 0, \
paramPtr->request = xreqEndXWEdit, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define HCWordBreakProc(paramPtr) \
( paramPtr->request = xreqHCWordBreakProc, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(ProcPtr)paramPtr->outArgs[0] \
)
#define PrintTEHandle(paramPtr, hTE, header) \
( paramPtr->inArgs[0] = (long)hTE, \
paramPtr->inArgs[1] = (long)header, \
paramPtr->request = xreqPrintTEHandle, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetCheckPoints(paramPtr) \
( paramPtr->request = xreqGetCheckPoints, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(CheckPtHandle)paramPtr->outArgs[0] \
)
#define SetCheckPoints(paramPtr, checkLines) \
( paramPtr->inArgs[0] = (long)checkLines, \
paramPtr->request = xreqSetCheckPoints, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define FormatScript(paramPtr, scriptHndl, insertionPoint, quickFormat) \
( paramPtr->inArgs[0] = (long)scriptHndl, \
paramPtr->inArgs[1] = (long) insertionPoint, \
paramPtr->inArgs[2] = (long)quickFormat, \
paramPtr->request = xreqFormatScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SaveXWScript(paramPtr, scriptHndl) \
( paramPtr->inArgs[0] = (long)scriptHndl, \
paramPtr->request = xreqSaveXWScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetObjectName(paramPtr, object, objName) \
( paramPtr->inArgs[0] = (long)object, \
paramPtr->inArgs[1] = (long)objName, \
paramPtr->request = xreqGetObjectName, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetObjectScript(paramPtr, object, scriptHndl) \
( paramPtr->inArgs[0] = (long)object, \
paramPtr->inArgs[1] = (long)scriptHndl, \
paramPtr->request = xreqGetObjectScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SetObjectScript(paramPtr, object, scriptHndl) \
( paramPtr->inArgs[0] = (long)object, \
paramPtr->inArgs[1] = (long)scriptHndl, \
paramPtr->request = xreqSetObjectScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define AbortScript(paramPtr) \
( paramPtr->request = xreqAbortScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GoScript(paramPtr) \
( paramPtr->request = xreqGoScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define StepScript(paramPtr, stepInto) \
( paramPtr->inArgs[0] = (long)stepInto, \
paramPtr->request = xreqStepScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define CountHandlers(paramPtr, handlerCount) \
( paramPtr->inArgs[0] = (long)handlerCount, \
paramPtr->request = xreqCountHandlers, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetHandlerInfo(paramPtr, handlerNum, handlerName, objectName, varCount) \
( paramPtr->inArgs[0] = (long)handlerNum, \
paramPtr->inArgs[1] = (long)handlerName, \
paramPtr->inArgs[2] = (long)objectName, \
paramPtr->inArgs[3] = (long)varCount, \
paramPtr->request = xreqGetHandlerInfo, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetVarInfo(paramPtr, handlerNum, varNum, varName, isGlobal, varValue, varHndl) \
( paramPtr->inArgs[0] = (long)handlerNum, \
paramPtr->inArgs[1] = (long)varNum, \
paramPtr->inArgs[2] = (long)varName, \
paramPtr->inArgs[3] = (long)isGlobal, \
paramPtr->inArgs[4] = (long)varValue, \
paramPtr->inArgs[5] = (long)varHndl, \
paramPtr->request = xreqGetVarInfo, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define SetVarValue(paramPtr, handlerNum, varNum, varHndl) \
( paramPtr->inArgs[0] = (long)handlerNum, \
paramPtr->inArgs[1] = (long)varNum, \
paramPtr->inArgs[2] = (long)varHndl, \
paramPtr->request = xreqSetVarValue, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#define GetStackCrawl(paramPtr) \
( paramPtr->request = xreqGetStackCrawl, \
(*(MyProcPtr) (paramPtr->entryPoint))(), \
(Handle)paramPtr->outArgs[0] \
)
#define TraceScript(paramPtr, traceInto) \
( paramPtr->inArgs[0] = (long)traceInto, \
paramPtr->request = xreqTraceScript, \
(*(MyProcPtr) (paramPtr->entryPoint))() \
)
#endif _HyperXCmd_LSC_